<?php
namespace App\Module\User\Service;

use App\Constants\Constant;
use App\Model\Teacher;

class TeacherService {

    public function search($pagesize){
        $data = Teacher::query()->where("is_show",Constant::GLOBAL_TRUE)->paginate($pagesize);
        return $data->setCollection($data->getCollection()->groupBy("campus"));
    }
}